<?php
// Copyright 2019 Hackware SpA <human@hackware.cl>
// This file is part of "Hackware Web Services Payment" and licensed under
// the terms of the GNU Affero General Public License version 3, or (at your
// option) a later version. You should have received a copy of this license
// along with the software. If not, see <https://www.gnu.org/licenses/>.

app('router')->group(
    ['namespace' => 'Hawese\Payment\Http\Controllers'],
    function ($router) {
        $router->get('gateways', [
            'as' => 'gateways.index',
            'uses' => 'GatewayController@index',
        ]);
        $router->get('gateways/payment-methods/{schema}', [
            'as' => 'gateways.payment-methods',
            'uses' => 'GatewayController@PaymentMethods',
        ]);
        $router->get('gateways/{gateway}/schemas/{schema}', [
            'as' => 'gateways.schema',
            'uses' => 'GatewayController@schema',
        ]);
        $router->post('gateways/{gateway}/purchase', [
            'as' => 'gateways.purchase',
            'uses' => 'GatewayController@purchase',
        ]);
        $router->post('gateways/{gateway}/notify', [
            'as' => 'gateways.notify',
            'uses' => 'GatewayController@notify',
        ]);

        $router->get('payments/{uuid}', [
            'as' => 'payments.show',
            'uses' => 'PaymentController@show',
        ]);
    }
);
